home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
EDITOR
/
WED502.ARJ
/
WEDMAN.DOC
< prev
Wrap
Text File
|
1992-03-12
|
116KB
|
2,295 lines
The WED Manual for
WED(r) Version 5.00
Copyright 1992 by Mason Washington and EdTech Associates Inc.
All rights reserved.
WED is a registered trademark of Washington Computer Company
and is licensed to EdTech Associates Inc.
----------------------------------------------------------------
WED Manual Table of Contents
----------------------------------------------------------------
1 Introduction
1.1 Program Description
1.2 Machine Requirements
1.3 Installing WED
2. Getting Started
2.1 Starting WED
2.3 The Command Line
2.4 The Status Line
2.5 The Text Window
2.6 The Help Command
2.7 Using WED's Pop-up Menus
2.8 The Quit Command
2.7.1 Save edit file
2.7.2 Keep and exit WED
2.7.3 Write and continue
2.7.4 Abandon file
3 Moving Around the File
3.1 Moving Around the Screen
3.1.1 The Arrow Keys
3.1.2 The Home and End Keys
3.1.3 The Right Word and Left Word Commands
3.1.4 The Next Space Command
3.2 The Scroll Commands
3.3 Up Screen and Down Screen
3.4 Repeat Factors
3.5.1 Goto Top
3.5.2 Goto Bottom
3.5.3 Goto Line Number
3.5.4 Goto Pointer
4 Changing the File
4.1 Entering Text
4.2 Inserting Text
4.3 Erasing Text
4.4 Locating and Replacing Text
4.4.1 Locate and Replace Options
4.4.1.1 Occurrences
4.4.1.2 Backwards Option
4.4.1.3 Whole Words Option
4.4.1.4 Ignore Case Option
4.4.1.5 No Query Option
4.4.1.6 Global Option
5 Advanced Commands
5.1 Setting Pointers
5.2 Moving Text
5.3 Copying Text
5.4 Zapping Text
5.5 Undeleting Text
Appending Text from Other Files
5.7 Writing Text to Another File
5.8 Editing Multiple Files
5.8.1 Opening Other Files
5.8.2 Switching Between Files
----------------------------------------------------------------
WED Manual Table of Contents
----------------------------------------------------------------
5.8.3 Quitting Other Files
5.8.4 The Zoom Command
5.8.5 Resizing Windows
5.9 Copying Text Between Files
5.10 The DOS Command
6 Editing with Word-Wrap
6.1 Word-Wrap Mode
7 Special Features for Programmers
7.1 Auto-Indent Mode
7.2 Re-Indenting with Format
7.3 The Execute User Program Command
7.4 The Pop-up ASCII Table
8 Editing Special Characters
8.1 Editing Files with Control Characters
8.2 Using Text or Graphics Characters
10 The Setup Command
10.1 Cursor Type
10.2 End-Of-Line Symbol
10.3 Locate Key Keep
10.4 User Programs
10.5 Keyboard Macros
10.6 Split Screen
10.7 Insert Type
10.8 <del> Key
10.9 Make BAK Files
10.10 File Name Keep
10.11 Swap Path
10.12 Monitor Type
10.13 Colors
10.14 EGA 43 Line Mode
10.15 Snow Removal
10.16 Auto Indent
10.17 Word Wrap
10.18 Right Margin
10.19 Tab Conversion
10.20 Tab Stops
10.21 Print Header
10.22 Print Line Numbers
10.23 Printer Page Height
10.24 Printer Page Width
10.25 Printer Top Margin
10.26 Printer Bottom Margin
10.27 Printer Left Margin
10.28 Printer Right Margin
10.29 Printer Setup String
10.30 Printer Reset String
10.31 Save Setup Values
1 Introduction
1.1 Program Description
WED is a fast and easy to use screen oriented text editor designed for
programming and light word processing. Being screen oriented means WED
continually displays a region of the file on the screen and allows the user to
change the file by making changes on the screen. The screen is changed by
moving the cursor to any place in the file and then typing new text or using
any of the advanced edit functions available.
WED is easy to learn and work with features like pop-up menus, context
sensitive help, and a convenient prompt line that lists the commands while
leaving most of the screen available for editing. WED's Undelete command even
makes it easy to undo mistakes.
With the powerful commands available in WED it is possible to search and
replace text and move or copy blocks of text within a single file or between
separate files. The extensive file handling allows multiple files to be
edited, split and merged, and includes the ability to split the screen and
view two files at the same time. It is possible to switch to the DOS prompt
without leaving the editor by using The DOS gateway command.
Other advanced features are designed to aid the programmer. The auto-indent
feature and the indent and undent commands save key strokes while entering and
editing programs. The execute command may be used to compile programs without
exiting the editor, thus eliminating wasted time spent switching between the
editor and the compiler. WED also provides a pop-up ASCII table with decimal,
hexadecimal, and other display formats.
WED is fast, utilizing all available memory to speed editing operations and
supports file swapping to allow editing of very large files.
WED supports an extensive setup command that will change the parameters that
control the way the editor operates. The setup may be changed at any time
during an edit session and saved for later edit sessions.
The file printing command can be used to print text files and source code
listings. Options such as page headers, page numbering, time stamping, line
numbering and margin sizes offer a wide variety of listing formats.
In addition, WED works well with the dBase III system. It can be set up as the
default editor and/or word processor using the TEDIT and WP keywords in a
CONFIG.DB file.
1.2 Machine Requirements
The WED editor will run on IBM PC's and compatibles having at least one disk drive
(floppy or hard disk) and 256K RAM. Since the editor is compact, it leaves
plenty of room for other files on a single floppy system. WED also works well
on hard disk systems; since the main editor is a single executable file with
no overlays, it can be placed in a default directory and accessed via the DOS
path command.
WED will display on either monochrome or color monitors. For color monitors
use the setup command to select the colors that the editor will use during
edit sessions.
1.3 Installing WED
WED should include the following files:
WED_READ.ME A short text file that should be read before using the
editor.
WEDMAN.DOC This document.
WED.EXE The WED text editor program.
WED.CFG This file contains WED configuration settings that are
maintained with the Setup command.
WED.HLP This file contains the text used by the help command.
Before installing WED make a backup of the original WED diskette, one that
will function as a "master working disk". To do this requires creating a
formatted bootable diskette. Place a blank diskette in drive B and enter the
following DOS command:
A>FORMAT/S B:<Enter>
When format is complete, move the newly formatted diskette to drive A, and
place the WED master diskette in drive B. Now copy all of the WED files to the
new diskette with the following DOS command:
A>COPY B:*.* A:<Enter>
After DOS has finished copying the files remove the WED master diskette and
put it away in a safe place. Always use the backup copy as the principal
working diskette when using WED. This ensures having an extra copy of WED if
the working diskette is damaged or lost.
If installing for a floppy based computer, the installation is complete. Skip
over the rest of this section.
If installing onto a hard disk copy WED to a subdirectory on the hard disk.
First create a new subdirectory. Move to the root directory and issue the
following command:
C\>MKDIR WED<Enter>
This will create a subdirectory call WED. Now move into the new subdirectory
with the command:
C\>CD WED<Enter>
Now place the new WED working diskette in drive A and copy the files onto the
hard disk:
C\WED>COPY A:*.* C:<Enter>
When using DOS version 3.00 or latter, WED can be accessed via the path
command. WED will automatically be able to find its support files, WED.CFG and
WED.HLP.
When using a version of DOS older than 3.00 set an environment variable so
that WED can find its support files. To do this, add the following line to the
AUTOEXEC.BAT file:
SET WED=C:\WEDDIR
where "WEDDIR" is the directory in which WED was copied.
If there is limited disk space on the hard drive or are using WED from floppy
disk, copy the three files: WED.EXE, WED.CFG, and WED.HLP. These three files
are the only files needed to run the WED editor. All of the other files that
come with WED are documentation files and do not need to be on the disk when
running WED.
The final step is to print out a copy of this manual. The manual is formatted
for 8 1/2 by 11 inch paper. The printer should be set to a print density of
ten CPI (characters per inch) and to a print height of six lines per inch.
Make sure the printer is on-line and positioned at the top of a new page. Then
use the DOS print command to print the manual:
C\>PRINT WEDUSER.DOC<Enter>
2. Getting Started
2.1 Starting WED
Starting the WED editor is easy. Enter "WED" from the DOS prompt. Remember to
complete the entry by pressing the <Enter> key. WED will begin the session by
displaying the main menu. From the main menu it is possible to edit a file,
print a file or modify WED configuration values.
To begin editing a file without passing through the main menu type the name of
the file to edit after "WED" on the command line:
C\>WED TEST.TXT<Enter>
In this example, WED will move directly to the edit mode with the file,
"TEST.TXT." If necessary, a drive and/or path may be included with the file
name.
2.2 The Main Menu
The WED main menu, shown in figure 2-1, provides access to the three main functional
areas of WED, editing, printing and setup:
┌──────────────────────────────────────────────────────────────────┐
│ ╔══════════════════════════════════════════════════════════════╗ │
│ ║ WED (r) Text Editor, V 5.00 ║ │
│ ║ Copyright 1987 - 1991, Mason Washington ║ │
│ ║ Licensed to EdTech Associates Inc. ║ │
│ ║ ║ │
│ ║ -*-*-* Shareware Version, For 30 Day Evaluation Only *-*-*- ║ │
│ ╚══════════════════════════════════════════════════════════════╝ │
│ │
│ │
│ 1. Edit a file │
│ │
│ 2. Print a file │
│ │
│ 3. WED setup menu │
│ │
│ 4. WED Ordering Info │
│ │
│ 5. Help │
│ │
│ 6. Exit WED │
│ │
└──────────────────────────────────────────────────────────────────┘
Figure 2-1
To make a selection use the <Up> and <Down> cursor keys to move the
highlighted bar to the desired option and then press the <Enter> key.
The first option, "Edit a file," is the WED text editing system. If this
option is selected WED will display a listing of the files in the current
directory and then prompt for the name of the file to be edited. If the file
name entered does not exist, WED will create a new file.
The second option, "Print a file," is a function for printing text files with
various formatting options. This function can be used to print source code
listings as well as document listings. The print file function is described in
detail in chapter nine.
The third option, "WED setup menu," provides access to the various WED
configuration variables. This function may be used to change colors, enter
keyboard macros or modify any of the setup parameters. The setup function is
described in detail in chapter ten.
The fourth option, "WED ordering info," displays information on how to order
registered copies of WED.
The fifth option, "Help," displays a help screen which describes the main menu
options.
The last option, "Exit WED," causes WED to terminate and return control to
DOS.
2.3 The Command Line
The top line of the edit screen is reserved for the command line. In the main
edit command mode the command line appears as shown in figure 2-2.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next │
│Line: 1 Col: 12 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
│/* MANUAL.C 09/17/88 -- converts WED master file to either disk */« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 2-2
The command line provides a quick reference of the WED commands. To execute
one of the commands, hold down the Alt key (located to the left of the space
bar) and type the first letter of the command. For example, to execute the
Move command, hold down the Alt key and type M. We call this combination of
keys Alt keys. In this example the move key would be denoted as Alt M.
Because WED has more commands than can fit on one line, the Next command has
been provided. This command displays the rest of the commands. Type Alt-N and
WED will display the additional commands.
2.4 The Status Line
The status line is the second line on the main edit screen. It provides useful information
about the current edit session. Below in figure 2-3 is an example of a typical
status line:
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next │
│Line: 2 Col: 11 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
│/* MANUAL.C 09/17/88 -- converts WED master file to either disk */« │
│/* manual, or laser file */« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 2-3
On the left side of the line, WED displays the current line and column at
which the cursor is positioned. The next entry shows the current Insert mode
state (overwrite or insert). To the right of the Insert mode indicator is a
space reserved for the graphics mode indicator. When the graphics mode is on
WED displays "Graphics" in this space.
The last two entries provide information about the size of the current edit
file and the amount of free space remaining in the main edit buffer. These
values are shown in kilobytes (1024 characters).
Just below the status line, there is a double line which separates the command
and status lines from the main text window. Notice that the name of the
current edit file is displayed in the center of this line.
2.5 The Text Window
All of the space below the status lines is used to display the file text. This area is called the
text window because it acts like a window into the file. It continuously
displays the region of the file being edited.
The text window will always contain the edit cursor which is displayed as a
blinking block or underline. The cursor indicates the current edit position in
the file. Any text entered will be placed in the file at the current cursor
location and most commands executed will start from the cursor location. WED
provides many commands for moving the cursor around the file including
commands for moving the cursor to the next character, word, or line, or back
to the previous character, word or line. These commands are described in
detail in chapter 3. As the cursor moves through the file WED will adjust the
text window so that it always displays the file region surrounding the cursor
location.
WED is designed to operate in the standard PC video mode in which the screen
can display eighty columns per line. This is wide enough for most text files,
but occasionally it is necessary to edit a file with lines longer than eighty
columns. WED handles these cases with a feature call horizontal scrolling
which is the ability to scroll (move) the text sideways as the cursor moves
past the side of the screen. With horizontal scrolling WED can edit files with
lines as long as 32,000 columns.
At the end of each line WED will display a special end of line character that
looks like two left facing arrows. This character indicates the presence of
the standard text line terminating sequence, a carriage return followed by a
line feed character.
2.6 The Help Command
One of the first commands that should be learned is the Help command. This command
provides a convenient on-line reference guide to the WED text editor. Help
screens can be displayed for any command. Just type Alt-H and WED will display
the help menu as shown in figure 2-4.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next │
│Line: 4 Col: 3 Insert Size: 7K Free: 227K │
│═══════════════════════════╔═════════════════╡ WED HELP ╞═════════════════╗═════│
│/* MANUAL.C 09/17/88 --║ cursor Erase Move Setup ║ │
│/* ║ quick Format Next Text ║ │
│« ║ Append Goto Other Undelete ║ │
│#include <stdio.h>« ║ Bridge Help Pointer Write ║ │
│#include <malloc.h>« ║ Copy Insert Quit eXecute ║ │
│#include <string.h>« ║ DOS Locate Replace Zap ║ │
│#include <ctype.h>« ║ ║ │
│« ║ Use cursor keys to move, <Enter> to select ║ │
│#define LF '\x0A'« ╚════════════╡ <Esc> to exit Help ╞════════════╝ │
│#define CR '\x0D'« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 2-4
Now use the cursor keys to move to the desired help topic and then press
<Enter> to view the selected help screen. After reading the help screen press
<space> to return to the help menu. Other help topics may be selected or press
<Esc> to return to the main edit mode.
The Help command reads the instruction text from a file called WED.HLP. Before
using the Help command, make sure that the help file is available and that WED
knows were it is. Refer to section 1.3 for directions on setting up the help
file. If the help file is not setup correctly and the Help command is invoked,
WED will display an error message.
2.7 Using WED's Pop-up Menus
Many of WED's editing commands communicate via pop-up menus. These menus are
usually displayed in the upper right corner of the screen and contain a list
of possible options. To select one of the options use the <Up> and <Dn> cursor
keys to move the highlighted menu bar to the desired option and then press the
<Enter> key. Type the first letter of the desired option and WED will
immediately select that option.
All of WED's pop-up menus have the ability to display help screens that
describe the options and their functions in detail. To access a menus help
screen either select the "Help" option or type alt-H (hold down the <Alt> key
and press the "H" key at the same time).
All of the pop-up menus may be aborted by pressing the <Esc> key. When a menu
is aborted, WED exits that menu without performing any actions.
2.8 The Quit Command
After editing of the file is complete, type Alt-Q to invoke the quit command. The screen will
appear as shown in figure 2-5. This command provides functions for saving and
quitting the current file.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next │
│Line: 4 Col: 3 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞═══╔══════╡ QUIT ╞══════╗═════════│
│/* MANUAL.C 09/17/88 -- converts WED master ║ Save edit file ║/« │
│/* manual, or laser fil║ Keep and exit WED ║/« │
│« ║ Write and continue ║ │
│#include <stdio.h>« ║ Abandon file ║ │
│#include <malloc.h>« ║ Help ║ │
│#include <string.h>« ╚══════╡ <Esc> ╞═════╝ │
│#include <ctype.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 2-5
When WED saves a file it first renames the original copy of that file
to .BAK, and then saves the new version of the file. For example, when saving
the file DEMO.PAS, WED will first rename the original to DEMO.BAK and then
will save the newly edited version as DEMO.PAS. To suspend the automatic
backup feature use the Setup command.
Sometimes when WED is saving a new or revised file, it is possible to
encounter a full disk or other disk problem. If this occurs, WED will display
an error message describing the problem and then prompt as follows:
Enter file to write to:
Now enter a new file name to write the revised file to. This name can include
a new drive and/or path.
The quit command has several options described below.
2.7.1 Save edit file
The Save option is the most commonly used Quit option. Type S from the quit
menu and WED will save the current file and then exit to the main menu. If
more than one file is being edited (with the Other file command), WED will
exit the current file and switch to one of the other files.
2.7.2 Keep and exit WED
The Keep option is similar to the Save option except that it exits to DOS
instead of the main menu after saving the edit file.
2.7.3 Write and continue
The Write option will save the current edit file without ending that edit
session. When Write is selected, WED saves the current edit file and then
continues the edit session. This option is convenient for periodically saving
the changes to disk during a long edit session.
2.7.4 Abandon file
The abandon option exits the current file without saving the file to disk. Any
changes made during the current edit session will be lost. This option is
useful when trying after a serious error has been made during the edit
session.
3 Moving Around the File
3.1 Moving Around the Screen
WED moves the cursor around the file by character, word, line or page very easily. WED
can even move the cursor to the beginning or end of a file with a few
keystrokes.
Moving with cursor control commands does not affect the text. The cursor
simply moves through words without changing them.
3.1.1 The Arrow Keys
The WED editor provides many commands for moving the cursor around the screen.
The most often used are the arrow keys on the numeric keypad at the right of
the keyboard. The left and right arrow keys move the cursor one character to
the left and right respectively. Notice that when the cursor attempts to move
right past the end of the line it is moved to the first character of the next
line. Conversely, if the cursor attempts to move left past the first column of
the line it will move up to the last character on the line above.
An easier way to move the cursor up or down one line is using the up and down
arrow keys. The up arrow key moves the cursor up one line. If possible, WED
will move the cursor to the same column in the above line. If the line above
does not extend out to the current column the cursor will be placed on the
last character of that line. The down arrow key performs just like the up key,
but in the opposite direction.
The <Enter> that performs similarly to the down cursor key. Pressing the
<Enter> key moves the cursor to the first character of the next line.
3.1.2 The Home and End Keys
There are more keys that provide for convenient movement of the cursor.
Pressing the Home key moves the cursor to the first character on the current
line. Pressing the End key moves the cursor to the last character of the line.
3.1.3 The Right Word and Left Word Commands
The Right Word and Left Word commands are similar to the right and left arrow
keys, only they work in increments of words instead of characters. To use
these commands, hold down the control key while pressing either the right or
left cursor key. Typing ctrl-<right arrow> moves the cursor to the first
character of the next word in the file and typing ctrl-<left arrow> moves the
cursor to the first character of the previous word (next word to the left) in
the file.
3.1.4 The Next Space Command
The Next Space command is similar to the Right Word command. Press the tab key
and WED will move the cursor to the next space or carriage return character in
the file.
3.2 The Scroll Commands
There are two types of scrolling in the WED editor: vertical scrolling and horizontal
scrolling. With vertical scrolling the entire text window is moved up or down
a line at a time. WED automatically performs vertical scrolling when the
cursor attempts to move past the top or the bottom edges of the text window.
With the scrolling commands it is possible to scroll to the text window
without moving the cursor (unless it is at the top or bottom of text window).
Type ctrl-<PgUp> to scroll the text up, or ctrl-<PgDn> to scroll the text
down.
Horizontal scrolling is similar to vertical scrolling, except that the text
window moves left or right a column at a time. As with vertical scrolling, WED
automatically scrolls the text window left or right when the cursor is moved
past the left or right margins. To perform horizontal scrolling without moving
the cursor, type ctrl-<Home> to scroll left or ctrl-<End> to scroll right.
Remember, WED requires that the cursor remain in the text window and on one of
the characters in the file. This means that it is impossible to scroll the
screen left if the cursor is in left column of the screen and on the last
character of a line.
3.3 Up Screen and Down Screen
The up and down arrow keys are fine for moving around the screen, but sometimes it is
necessary to move the cursor more than just a couple of lines. The up screen
and down screen functions are useful for these situations. These commands move
the cursor an entire screen at a time. This is twenty-two lines when in the
full screen mode, and ten or eleven lines when in the split screen mode.
The Down Screen function is activated by pressing the <PgDn> key and the Up
Screen function by pressing the <PgUp> key. Both of these functions can be
used with a repeat factor to move large distances through the file. Repeat
factors are explained below.
3.4 Repeat Factors
Sometimes when moving around the file it is necessary to repeat a command several times.
For example, to move the cursor down five screens of text it requires pressing
the <PgDn> key five times. WED provides an easier way of repeating a command.
Entering a repeat factor before a command tells WED how many times to execute
the command. To enter a repeat factor use the numeric keypad on the right side
of the keyboard. Hold down the shift key and type the number (between 1 and
9999) and then the appropriate command key. For example, to move the cursor
down 9 screens type the following:
shift-9<PgDn>.
Repeat factors are also useful when setting up repeat loops in command macros.
For more information on command macros refer to chapters 5 and 8.
3.5 The Goto Commands
The Goto command provides a means for quickly moving the cursor to a particular place in
a file. Top and Bottom sub-commands will move the cursor directly to the top
or the bottom of a file. The Line sub-command will move the cursor to any line
by specifying a particular line number. Also, the Goto command will move the
cursor to any pointer that has been set during the edit session. For more
information on pointers refer the section on setting pointers.
To invoke Goto type Alt-G and WED will display the Goto menu as shown in
figure 3-1.
┌─────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next │
│Line: 5 Col: 20 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞═════════════╔═╡ GOTO ╞═╗═════════ │
│/* MANUAL.C 09/17/88 -- converts WED master file to ei║ Top ║/« │
│/* manual, or laser file ║ Bottom ║/« │
│« ║ Line # ║ │
│#include <stdio.h>« ║ Help ║ │
│#include <malloc.h>« ╚═╡ <Esc> ╞╝ │
│#include <string.h>« │
└─────────────────────────────────────────────────────────────────────────────────┘
Figure 3-1
If any pointers are set they will be listed along with the number of the line
on which they are set. In the above example pointer one has been set on line
154.
3.5.1 Goto Top
Select "Top" to move the cursor directly to the top of the current edit file.
3.5.2 Goto Bottom
Select "Bottom" to move the cursor to the bottom (end) of the current edit
file.
3.5.3 Goto Line Number
To move directly to a particular line, select "Line #" and WED will prompt for
the line number. Enter the number of the line to go to, and WED will move the
cursor to that line.
3.5.4 Goto Pointer
If any of WED's eight edit pointers have been set, the cursor can be moved to
one of them by selecting that pointer from the Goto Menu.
4 Changing the File
4.1 Entering Text
When entering WED the editor is in overwrite mode. This is the mode from which most of
the editing functions, including text entry, is performed. Entering text is
easy. Simply type the text the way it should appear. As each character is
typed it appears on the screen at the current cursor position and the cursor
then moves one character to the right. If the cursor is positioned over an
existing character in the text any character that is typed will overwrite the
existing character.
There are several special cases when entering text at the main edit mode. WED
will never overwrite a carriage return. If new text is entered while the
cursor is positioned at the end of a line the text will be inserted ahead of
the carriage return. Another special case concerns the operation of the
<Enter> key. Normally, pressing this key the cursor moves to the first charac-
ter of the next line. The exception is if the cursor is positioned at the
bottom of the file and the <Enter> key is struck. If this is the case WED will
insert a carriage return and move the cursor to the beginning of the new line.
4.2 Inserting Text
There are four commands for inserting text into a file. The first two commands, Insert Space
and Insert Carriage Return, are useful for inserting just a few characters
into a file. The Insert Space command inserts a space character at the cursor
location. To use this command place the cursor at the position where the new
character should be inserted. Press the grey plus <+> key located on the right
keypad, and WED will insert a space at the cursor location.
The Insert Space command can also be used to insert characters other than
spaces into a file. First press the grey <+> key to insert the space. Notice
that WED leaves the cursor on the newly inserted space. Now type the character
to be inserted and it will overwrite the new space.
Another useful command for quick insertions is the New line command. This
command inserts a carriage return at the cursor location. To use this command
hold down the <Ctrl> key and type M (Ctrl-M).
The other two insert commands are more useful when inserting larger amounts of
text. Both commands perform similar functions, but with different approaches.
Either command may be used to perform general text inserting. Which command
chosen will depend mostly on personal preferences.
The first of these commands, the insert mode, is activated by typing Alt-I.
When WED is in the insert mode the user can continue to move around the file
and execute commands just like the overwrite mode. The difference is that any
text typed in the insert mode will be inserted ahead of the current cursor
location.
The last command is the Insert command. This command also allows continuous
text to be entered. Unlike the insert mode, other editing tasks cannot be
performed while using the Insert command. The Insert command is sometimes
easier to use than the insert mode because it opens a blank area on the screen
in which text can be entered.
To use this command move the cursor to the position where text is to be
inserted and press the <Ins> key to enter the Insert mode. As shown in figure
4-1, WED will then open two blank lines in which new text can be entered.
┌────────────────────────────────────────────────────────────────────────────────┐
│INSERT: Enter text, then <Ins> │
│Line: 5 Col: 20 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
│/* MANUAL.C 09/17/88 -- converts WED master file to either disk */« │
│/* manual, or laser file */« │
│« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-1
The text to be inserted should now be typed in. While in Insert mode there are
two keys available for correcting mistakes: the backspace key and the home
key. The backspace key (the key directly above the <Enter> key) will erase the
last character entered. The <Home> key will erase all of the characters
entered on the current line.
As lines are added the text below the insert will automatically drop down to
make more room. If the auto indent mode is turned on WED will insert spaces
for indentation at the beginning of each new line. Refer to section 6.1 for
more information on auto indenting. After entering the text to be inserted,
type Alt-I or press the <Ins> to exit insert mode. The gap after the inserted
text will be closed and the command line will return to its normal state.
An insert session can be aborted by pressing the <Esc> key while in insert
mode. WED will prompt "ABORT(Y/N)?" in the upper right hand corner of the
screen. Enter "N" to continue inserting or "Y" to abort the inserted text. If
yes is selected the text that has been inserted will be erased and WED will
return to the command mode.
4.3 Erasing Text
WED provides three commands for erasing text from a file. The first two commands, Delete
Character and Erase, are described in this section. The third command, Zap, is
described in section 5.4.
The Delete Character command is best for erasing just a few characters. There
are two variations of this command: Delete Left and Delete cursor. To delete
left, press the backspace key and WED will delete the character immediately to
the left of the cursor. To delete cursor, press the minus key (located at the
far right on the keyboard) and the character under the cursor will be deleted.
For removing more than a few characters at a time the Erase command is more
practical. This command is invoked by typing Alt-E or by pressing the <Del>
key. To use the command, move the cursor to the first character of the section
of text to be removed and type Alt-E or <Del>. The screen will appear as shown
in figure 4-2.
┌────────────────────────────────────────────────────────────────────────────────┐
│ERASE: Move cursor, then <Del> │
│Line: 5 Col: 20 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
│/* MANUAL.C 09/17/88 -- converts WED master file to either disk */« │
│/* manual, or laser file */« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-2
Use the standard cursor movement commands to move the cursor to the last
character of the text to be removed. As the cursor is moved the text between
the starting point and the cursor will be shown in low intensity to designate
that text as marked for erasure. Notice that the cursor can move to the left
and/or up to un-mark text. When the cursor is on the last character of the
text to be erased type Alt-E or <Del> and the text will be removed. To abort
the erase command can press the <Esc> key.
If the Erase command is used to delete a large block of text the message,
"text too large for delete buffer, ok to delete anyway?" may be displayed.
This means the the block of text to be deleted is too large to fit in the
delete buffer and thus will not be available for retrieval using the Undelete
command. Type "Y" to complete the Erase operation, or type "N" to cancel the
command.
4.4 Locating and Replacing Text
To locate, locate and replace or locate and delete any word or phrase (string of characters)
in the file use the Locate and Replace commands. The string can be as long as
66 characters.
Type Alt-L to invoke the Locate command and the screen will appear as shown in
figure 4-3.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 5 Col: 20 Insert Size: 7K Free: 227K │
│═════╔═════════════════════════════╡ LOCATE ╞═════════════════════════════╗═════│
│/* M║ Enter text, then <RET> ║ │
│/* ║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║ │
│« ╚════════════════════════════════════════════════════════════════════╝ │
│#include <stdio.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-3
Type the word or phrase to be located. If any errors are made WED provides
some basic editing functions for correcting the entry. The left and right
cursor keys move the cursor left and right. The Home and End keys move the
cursor to the beginning or the end of the entry. Both the minus key and the
<Del> key delete the character under the cursor. The plus key inserts a space
at the cursor and the <Ins> key toggles between insert mode and overwrite
mode. Typing ctrl-<End> deletes from the cursor to the end of the entry. When
the entry is correct press the return key and the screen will appear as shown
in figure 4-4.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 5 Col: 20 Insert Size: 7K Free: 227K │
│═════╔═════════════════════════════╡ LOCATE ╞═════════════════════════════╗═════│
│/* M║ Enter text, then <RET> ║ │
│/* ║ foo ║ │
│« ╚════════════════════════════════════════╔══════╡ Options ╞═════╗════╝ │
│#include <stdio.h>« ║ occurrences: 1 ║ │
│#include <malloc.h>« ║ Backward ║ │
│#include <string.h>« ║ Whole words only ║ │
│#include <ctype.h>« ║ Ignore case ║ │
│« ║ Help ║ │
│#define LF '\x0A'« ╚═╡ <Space> to select ╞╝ │
│#define CR '\x0D'« │
│« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-4
These options are explained in section 4.4.1. To search without options press
the return key. WED will then search from the current cursor location down
towards the end of the file. If it finds the phrase entered the cursor will be
moved to that location in the file. If it cannot find the phrase the cursor
will not be moved.
To locate the next occurrence of the same phrase, type Ctrl-L (hold down the
<Ctrl> key while pressing the L key) and WED will locate the next occurrence
of that phrase using the same locate options.
There is an additional feature for the Locate command which can be activated
with the Setup command. When the Locate key flag is set to keep, WED will
remember the last the phrase entered. The next time the Locate command is used
WED will display the search phrase from the last time the command was issued.
The phrase can be accepted, edited or a new one may be typed in. This feature
is convenient when performing many searches for similar phrases. For more
information on selecting this feature, refer to section 9.3.
The Replace command is similar to the Locate command. To invoke it, type Alt-R
and the screen will appear as shown in figure 4-5.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔═════════════════════════════╡ REPLACE ╞════════════════════════════╗═════│
│/* M║ Enter old text, then <RET> ║ │
│/* ║ ║ │
│« ║ ║ │
│#incl║ ║ │
│#incl╚════════════════════════════════════════════════════════════════════╝ │
│#include <string.h>« │
│#include <ctype.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-5
Now type the word or phrase to be replaced. Complete the entry by pressing the
return key. WED will then prompt for the replacement word or phrase as shown
in figure 4-6.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔═════════════════════════════╡ REPLACE ╞════════════════════════════╗═════│
│/* M║ Enter old text, then <RET> ║ │
│/* ║ foo ║ │
│« ║ Enter new text, then <RET> ║ │
│#incl║ bar ║ │
│#incl╚════════════════════════════════════════════════════════════════════╝ │
│#include <string.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-6
Now enter the replacement string and complete the entry with the Enter key.
The options prompt will then be displayed as shown in figure 4-7.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔═════════════════════════════╡ REPLACE ╞════════════════════════════╗═════│
│/* M║ Enter old text, then <RET> ║ │
│/* ║ foo ║ │
│« ║ Enter new text, then <RET> ║ │
│#incl║ bar ║ │
│#incl╚════════════════════════════════════════╔══════╡ Options ╞═════╗════╝ │
│#include <string.h>« ║ occurrences: 1 ║ │
│#include <ctype.h>« ║ Backward ║ │
│« ║ Whole words only ║ │
│#define LF '\x0A'« ║ Ignore case ║ │
│#define CR '\x0D'« ║ No query ║ │
│« ║ Global ║ │
│char style_strings[][41] = { "<style1>",« ║ Help ║ │
│ "<style2>",« ╚═╡ <Space> to select ╞╝ │
│ "<style3>"« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 4-7
To replace without options press the Enter key. WED will then search from the
current cursor location down towards the end of the file. If it finds the
phrase entered, the cursor will be moved to that location in the file, and the
prompt "REPLACE?" will appear in the upper right corner of the screen. Type
"Y" and the string will be replaced. If WED cannot find the phrase, the cursor
will be left in its original position.
To perform the same replacement on the next occurrence of the string, type
Ctrl-R and WED will repeat the Replace command, using the same search and
replacement strings and the same options.
4.4.1 Locate and Replace Options
There are six options that help define the scope of the locate or replace
operation. When the return key is pressed at the options prompt WED looks for
an exact string of characters and conducts the search forward from the current
cursor position. The options give considerably more flexibility. None, one or
several of the options can be chosen. To select an option use to cursor keys
to move the cursor bar to the desired option and press the <space> key to
select that option. Pressing the <space> key again will deselect that option.
On option can also be selected or deselected by typing the first letter of the
option. For example, type "B" to select "Backward." After selecting the
desired options press the <Enter> key and WED will begin searching. Each of
the available options is described in the following paragraphs.
4.4.1.1 Occurrences
Both the Locate and Replace commands may specify the number of times to
perform the operation. This is referred to in the options menu as
"occurrences." The default value is one which means locate (or replace) the
first occurrence of the phrase. To change this value enter the desired number
from any position in the options menu. Notice that the value is displayed next
to the "occurrences" prompt. The entry can be corrected by using the
<backspace> key.
4.4.1.2 Backwards Option
The Backward option causes WED to search backward from the current cursor
location to the beginning of the file. It can be used with either the Locate
or the Replace command.
4.4.1.3 Whole Words Option
The whole words option instructs WED to search for whole words only. WED will
skip over strings that are embedded in other words. For example, if the search
string is "the" and the cursor is at the beginning of the following line:
"and then the . . ."
Locate will not stop at "then" even though it begins with the string "the".
Instead, Locate will stop at the whole word "the".
4.4.1.4 Ignore Case Option
The ignore case option instructs WED to ignore the difference between upper
and lower case letters. It will find all occurrences of the string, regardless
of which letters are capitalized.
4.4.1.5 No Query Option
The No Query option only pertains to the Replace command. Normally the Replace
command asks for approval before each replace operation. With the No Query
option WED can be instructed to replace without querying for approval. This
feature is useful when performing multiple replaces. When replacing with the
No Query option WED will show each replacement as it occurs unless the Global
option is also chosen. If the Global option is chosen WED performs all
replacements before showing the altered file.
4.4.1.6 Global Option
With the Global option WED can be instructed to replace all occurrences of a
string in the entire file. WED will start processing at the beginning of the
file and work towards the end. If this option is used in conjunction with the
Backward option WED will start at the end of the file and work towards the
beginning. When this option is used with the No Query option WED will perform
all replaces before displaying the altered file.
5 Advanced Commands
5.1 Setting Pointers
WED will set up to eight pointers in the text while editing. These pointers can be used for
quick cursor movement with the Goto command or they can be used to mark text
for block commands such as Move and Copy which are described below.
To set a pointer move the cursor to the location the pointer should be placed
and type Alt-P to invoke the Pointer command and the screen will appear as
shown in figure 5-1.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════════╔═╡ POINTER ╞═╗═════════│
│[2][4]/* MANUAL.C 09/17/88 -- converts WED master f║ 1 ║isk */« │
│/* manual, or laser file ║ 2 1 ║/« │
│« ║ 3 12 ║ │
│#include <stdio.h>« ║ 4 1 ║ │
│#include <malloc.h>« ║ 5 ║ │
│#include <string.h>« ║ 6 ║ │
│#include <ctype.h>« ║ 7 ║ │
│« ║ 8 ║ │
│#define LF '\x0A'« ║ Help ║ │
│#define CR '\x0D'« ╚══╡ <Esc> ╞══╝ │
│« │
│[3]char style_strings[][41] = { "<style1>",« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-1
If any of the pointers are already set the number of the line on which they
are set will be displayed next to the pointer number. In addition, if any of
the pointers are set to a position within the text window their position in
the text will be indicated with the pointer number enclosed in square
brackets. In the example screen above, pointers one and four have been set.
Pointer four's position falls within the edit window and is indicated by
"[4]."
Now select one of the pointers to set it to the current cursor location. If
pointer that is already set is picked, it will forget the old location and be
set to the current location. WED will indicate the new setting by displaying
the pointer number in square brackets at the new pointer position in the text.
5.2 Moving Text
The Move command moves a marked section of text from one part of a file to another. This
command is useful when moving an entire paragraph or section of a file to
another location within the file.
Before executing the Move command, pointers must be placed at the beginning
and the end of the block of text to be moved. After marking the block to be
moved, move the cursor to the desired target location. Now invoke the Move
command by typing Alt-M and the screen will appear as shown in figure 5-2.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔══════════════════════════════╡ MOVE ╞══════════════════════════════╗═════│
│/* M║ Top Bottom Current 1 2 4 starting at ║ │
│/* ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝ │
│« │
│#include <stdio.h>« │
│#include <malloc.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-2
In this example pointers number 1 and 2 have been set as indicated by the "1"
and the "2" in the prompt line. Now enter the number of the pointer that marks
the beginning of the block to be moved. Note that Top, Bottom or Current
location may be used as an end point. After the first pointer number has been
entered (in this example, 1) the prompt will change to the screen shown in
figure 5-3.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔══════════════════════════════╡ MOVE ╞══════════════════════════════╗═════│
│/* M║ Top Bottom Current 1 2 4 starting at 1, ending at ║ │
│/* ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝ │
│« │
│#include <stdio.h>« │
│#include <malloc.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-3
Enter the number of the pointer that marks the end of the block to be moved,
and WED will move the block of text to the current cursor location.
5.3 Copying Text
The Copy command makes a duplicate copy of a marked section of text in the file and
places that copy at the current cursor location. This command is useful when
repeating a section of the text once or more in a file.
Before executing the Copy command pointers must be placed at the beginning and
the end of the block of text to be copied. After the block to be copied has
been marked, move the cursor to the desired target location. To invoke the
Copy command type Alt-C and the screen will appear as shown in figure 5-4.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔══════════════════════════════╡ COPY ╞══════════════════════════════╗═════│
│/* M║ Top Bottom Current 1 2 4 starting at 1, ending at ║ │
│/* ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝ │
│« │
│#include <stdio.h>« │
│#include <malloc.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-4
In this example pointers number 1 and 2 have been set as indicated by the "1"
and the "2" in the prompt line. Now enter the number of the pointer that marks
the beginning of the block to be copied. Note that the Top, Bottom or Current
location may be used as an beginning point. After entering first pointer
number (in this example, 1) you will be prompted for the ending pointer. Now
enter the number of the pointer that marks the end of the block to be copied
and WED will copy the block of text to the current cursor location.
5.4 Zapping Text
The Zap command provides a quick way to delete large sections of text from a file.
Before executing the Zap command, pointers must be placed at the beginning and
the end of the block of text to be deleted. After marking the block to be
deleted type Alt-Z to invoke the Zap command and the screen will appear as
shown in figure 5-5.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔══════════════════════════════╡ ZAP ╞══════════════════════════════╗═════│
│/* M║ Top Bottom Current 1 2 4 starting at 1, ending at ║ │
│/* ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝ │
│« │
│#include <stdio.h>« │
│#include <malloc.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-5
In this example the number 1 and 2 pointers have been set as indicated by the
"1" and the "2" in the prompt line. Now enter the number of the pointer that
marks the beginning of the block to be deleted. Note that the Top, Bottom or
Current location may be used as a beginning point. After entering the first
pointer number (in this example, 1) you will be prompted for the ending
pointer. Now enter the number of the pointer that marks the end of the block
to be zapped and WED will delete the block of text from the file.
If the Zap command is used to delete a large block of text the message, "text
too large for delete buffer, ok to delete anyway?" may be displayed. This
means the block of text to be deleted is too large to fit in the delete buffer
and thus will not be available for retrieve the text using the Undelete
command. Type "Y" to complete the Zap operation or type "N" to cancel the
command.
5.5 Undeleting Text
When deleting text with the Erase or Zap commands WED automatically saves the deleted
text in the delete buffer. With the Undelete command the most recently deleted
block of text can be retrieved. To Undelete text move the cursor to the point
where the deleted text should be placed, and type Alt-U.
The delete buffer also be used for quick cut and paste operations. Simply
delete the source block, move the cursor to the new position, and then use the
Undelete command to insert the deleted block at the new location.
5.6 Appending Text from Other Files
The Append command enables text to be inserted from another file into the file that is
currently being edited. To invoke the Append command move the cursor to the
position where the other file should be inserted and then type Alt-A. The
screen will now appear as shown in figure 5-6.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════════╔════════════════════════╡ APPEND FILE ╞═══════════════════════╗═══════│
│/* MANUA║ Path: F:\\*.* ║ │
│/* ║ File: share.doc ║ │
│« ║ ║ │
│#include ║ manual c share doc zepixpro doc ║ │
│#include ║ ║ │
│/*=======║ ║ │
│« ╚═════╡ Ctrl-PgDn for new dir; Ctrl-Home for current dir ╞═════╝ │
│void shareware()« │
│« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-6
Enter the name of the file to be inserted. Include the disk drive and path if
desired. If one is not specified WED will default to the same disk and path of
the main edit file. WED will then insert that entire file at the current
cursor location.
5.7 Writing Text to Another File
The Write command writes a marked block of text from the current file to a new file on disk.
It is a useful command for creating stock paragraphs or for saving sections of
a file that will later be inserted into other files.
Before executing the Write command pointers must be placed at the beginning
and the end of the block of text that will be written. After marking the block
to be written, type Alt-W to invoke the write command. WED will prompt as
shown in figure 5-9.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│═════╔══════════════════════════════╡ WRITE ╞═════════════════════════════╗═════│
│/* M║ Top Bottom Current 1 2 4 starting at 1, ending at ║ │
│/* ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝ │
│« │
│#include <stdio.h>« │
│#include <malloc.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-7
In this example, pointers number 1 and 2 have been set as indicated by the "1"
and the "2" in the prompt line. Enter the number of the pointers that mark the
beginning and end of the block to be written. Note that the Top of file,
Bottom of file or Current cursor location may be used as beginning or end
points.
Now enter the number of the pointer that marks the end of the block to be
written. WED will now ask for the file to write to as shown in figure 5-8.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 11 Col: 1 Insert Size: 7K Free: 227K │
│══════╔══════════════════════════════╡ WRITE ╞═════════════════════════════╗════│
│/* MA║ Top Bottom Current 1 2 starting at 1, ending at 2 ║ │
│/* ╔═══════════════════════╡ WRITE TO FILE ╞══════════════════════╗══════╝ │
│« ║ Path: F:\\*.* ║ │
│#incl║ File: ║ │
│#incl║ ║ │
│#incl║ manual c share doc zepixpro doc ║ │
│#incl║ ║ │
│/*===║ ║=*/« │
│« ╚═════╡ Ctrl-PgDn for new dir; Ctrl-Home for current dir ╞═════╝ │
│void shareware()« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-8
Enter the name of the file to which to write the block of text to and press
the return key. A disk drive and path can be included when entering the name.
If they are not included, WED will default to the same disk and path as the
main edit file. WED will now write the marked text out to the specified file.
Note: if the name of an existing file is specified that file will be replaced
by the new file.
5.8 Editing Multiple Files
Often while editing situations may occur where it is desirable to be able to switch back and
forth between several files with a minimum of time and effort. With the Other
Files command WED allows up to ten separate edit files to be loaded at one
time. Switching between those files, copying text between them and even
displaying two of them at the same time is quite easy.
With this powerful feature, the task of working on large systems that span
over multiple files is greatly simplified. For example, an external
declaration can be displayed in one window while editing the code that uses
that declaration is displayed in the other window. It is even possible to copy
select sections of text of code from one file to another.
5.8.1 Opening Other Files
To execute the Other file command type Alt-O from the main edit menu. WED will
display the Other File menu as shown in figure 5-9.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 11 Col: 1 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════╔═╡ OTHER FILE ╞══╗═════════│
│/* MANUAL.C 09/17/88 -- converts WED master fil║ Open other file ║/« │
│/* manual, or laser file ║ Zoom (in/out) ║/« │
│« ║ Resize window ║ │
│#include <stdio.h>« ║ Help ║ │
│#include <malloc.h>« ╚════╡ <Esc> ╞════╝ │
│#include <string.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-9
Select "Open other file" and WED will prompt for the name of the Other file to
edit. If the name of a file which does not exist is entered WED will create a
new file.
Once the other file is loaded it can be edited with all the features available
for the primary file. With the split screen feature described below WED can
split the display screen and display both edit files simultaneously.
The Load Other File command can be repeated for loading up to ten files at the
same time.
5.8.2 Switching Between Files
Switching between files loaded with the Other files command is easy. Type Alt-
O to invoke the Other files command and WED will list any other open files at
the bottom of the menu as shown in figure 5-10.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════╔═╡ OTHER FILE ╞══╗═════════│
│/* MANUAL.C 09/17/88 -- converts WED master fil║ Open other file ║/« │
│/* manual, or laser file ║ Zoom (in/out) ║/« │
│« ║ Resize window ║ │
│#include <stdio.h>« ║ Help ║ │
│#include <malloc.h>« ║ ║ │
│#include <string.h>« ║ 1 F:\demo.c ║ │
│#include <ctype.h>« ╚════╡ <Esc> ╞════╝ │
│« │
│#define LF '\x0A'« │
│#define CR '\x0D'« │
│═══════════════════════════════════╡ demo.c ╞═══════════════════════════════════│
│#include <stdio.h>« │
│« │
│main()« │
│{« │
│ fprintf( stdout, "Hello WED World!" );« │
│}« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-10
Select the desired file from the list of open files.
5.8.3 Quitting Other Files
Quitting a file when more than one file is loaded is the same as quitting with
only one file loaded. Instead of returning to the main menu or exiting to DOS
WED will switch to the next most recently accessed open file.
5.8.4 The Zoom Command
As mentioned above, WED has the ability to display two files at the same time.
This is called split screen editing and is accomplished by splitting the
screen with a horizontal line and displaying one file in the top window and
the other in the lower window. It is possible to switch back and forth between
full screen editing and split screen editing with the "Zoom (in/out)" option
of the Other files command. The default mode can be set (split or full screen)
with the Setup command.
5.8.5 Resizing Windows
When using the split screen mode WED splits the screen in the middle by
default. This can be changed using the "Resize window" option of the Other
files command. Select the option, then use the <up> and <down> cursor keys to
move the split bar to the desired row and then press the <Esc> key to complete
the operation. The can set the default size for split screens with the Setup
command.
5.9 Copying Text Between Files
The Bridge command is similar to the Copy command. The only difference being it copies
text from another file thus providing a bridge between the two files. To use
the Bridge command it is necessary to first load both files using the Other
File command. The next step is to place pointers at the beginning and the end
of the block of text to be copied. After marking the block to be copied,
switch to the destination file by typing Alt-O. Move the cursor to the place
in the destination file where the block will be copied to. Type Alt-B and WED
will prompt for the source file (the file containing the text to be copied) as
shown in figure 5-11.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 1 Col: 1 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════╔═══╡ BRIDGE ╞════╗═════════│
│/* MANUAL.C 09/17/88 -- converts WED master fil║ From what file? ║/« │
│/* manual, or laser file ║ ║/« │
│« ║ 1 F:\demo.c ║ │
│#include <stdio.h>« ╚════╡ <Esc> ╞════╝ │
│#include <malloc.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 5-11
Next, WED will prompt for the beginning and ending points of the block of
text. Specify the pointers in the same manner as with the Copy command.
Remember that the pointers referred to are the pointers set in the source
file. WED will then copy the text from the other file into the current file at
the current cursor location.
5.10 The DOS Command
WED provides a gateway to DOS which allows DOS commands or other programs to be
executed without ending the WED edit session. To use this feature type Alt-D
from the main menu. The screen will clear and the DOS prompt will be
displayed. Enter commands in the same manner as if at the normal DOS prompt.
To return to the editor enter "EXIT" and WED will resume the interrupted edit
session.
When using the DOS gateway command WED remains in memory along with the
file(s) that are being edited. This means that there will be less memory
available to any programs being run while under this command.
If the drive or subdirectory is changed while in the DOS gateway, it must be
changed back before returning to WED with the "EXIT" command.
6 Editing with Word-Wrap
The word-wrap option in WED is designed to support documentation tasks. When the
word-wrap option is turned text can be entered without worrying about where
the right margin is. When typing past the right margin WED will automatically
break the current line at the last word break and then move the current word
to the next line. If changes are made to the text the margins can be realigned
with the format command.
6.1 Word-Wrap Mode
WordWrap mode causes the text to automatically drop down to the next line when the right
margin is passed while entering text. This is similar to the way a word
processor functions. To use the word-wrap mode set the word-wrap setup field
to "on" and select the desired right margin setting. This can be done using
the "Setup" command as described in Chapter 10.
Once the word-wrap mode has been selected begin entering text with either the
insert or overwrite mode. When typing past the right margin WED will scan back
to the beginning of the current word and insert a carriage return. The current
word will be moved to the next line. This allows continuous typing with out
the need to hit the <enter> key to end a line.
Word-Wrapped text can be indented by setting auto-indent value in the setup
screen to "yes". When this has been done WED will automatically indent the new
lines created by word-wrap to the same column as the previous lines.
6.2 Reformatting a Paragraph with Format
The word-wrap mode works well when entering new text, but it does not automatically re-
format text when the text is moved or deleted inside a paragraph. To reformat
text within the margins it is necessary to use the Format command. Place
pointers at the beginning and end of the paragraph(s) to be reformatted and
type Alt-F. The screen will appear as shown in figure 6-1.
┌────────────────────────────────────────────────────────────────────────────────┐
│Line: 1 Col: 1 Overwrite Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞═══════════╔═╡ FORMAT ╞═╗═════════│
│/* MANUAL.C 09/17/88 -- converts WED master file to ║ Indent ║/« │
│/* manual, or laser file ║ Undent ║/« │
│« ║ Paragraph ║ │
│#include <stdio.h>« ║ Help ║ │
│#include <malloc.h>« ╚══╡ <Esc> ╞═╝ │
│#include <string.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 6-1
Select the "Paragraph" option and WED will prompt for the left and right
margins. Note that WED will provide default values. The left margin will
default to one and the right margin will default to the value selected with
the Setup command. Enter the margin values and then WED will prompt for the
beginning and end of the paragraph to re-format. Enter the numbers of the
pointers to mark the text to be reformatted. WED will re-flow the text between
the pointers using the same rules it uses when entering text with word-wrap.
7 Special Features for Programmers
7.1 Auto-Indent Mode
The auto indent mode saves key strokes when editing programs which use indentation. This
feature only operates when the editor is in the Insert mode.
If auto indent is turned on and text is being entered in the Insert mode,
after each carriage return WED will indent the next line to the same level as
the current line. It does this by automatically entering spaces or tabs at the
beginning of the line. To change the indentation level of the new line, use
either the backspace or space keys to reduce or increase the indentation level
of the line.
Auto indent checks the Tab Conversion flag to determine if it should insert
spaces or tabs. If the flag is set to "spaces" auto indent will use only
spaces. If it is instead set to "tabs" auto indent will use tabs whenever
possible. The setting of the Tab Conversion flag can be change with the Setup
command.
7.2 Re-Indenting with Format
The Format command allows blocks of text to be moved to the left or to the right. This is
useful for programmers working in structured languages such as C and PASCAL.
With this command the indentation of entire blocks of code can be changed with
one command.
Before executing the format command pointers must be placed at the beginning
and the end of the block of text to be reformatted. After marking the block
type Alt-F to invoke the Format command. The menu will appear as shown in
figure 7-1.
┌────────────────────────────────────────────────────────────────────────────────┐
│Line: 1 Col: 1 Overwrite Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞═══════════╔═╡ FORMAT ╞═╗═════════│
│/* MANUAL.C 09/17/88 -- converts WED master file to ║ Indent ║/« │
│/* manual, or laser file ║ Undent ║/« │
│« ║ Paragraph ║ │
│#include <stdio.h>« ║ Help ║ │
│#include <malloc.h>« ╚══╡ <Esc> ╞═╝ │
│#include <string.h>« │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 7-1
To move the text block to the right select Indent. Otherwise select Undent to
un-indent the block (move it to the left). Next enter the number of spaces to
move the text. Then WED will prompt for the end points of the block to re-
indent as shown in figure 7-2.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: 22 Col: 1 Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞═══════════╔═╡ FORMAT ╞═╗═════════│
│#define CR '\x0D'« ║ Indent ║ │
│« ╔═════╡ INDENT ╞══════╗ ║ │
│char style_strings[][41] = { "<style1>",« ║ How Many Spaces? 4 ║ph ║ │
│╔═════════════════════════════╡ INDENT ╞═════════════════════════════╗║ │
│║ Top Bottom Current 1 2 starting at 1, ending at ║╝ │
│╚═══════════════════════════╡ H for help ╞═══════════════════════════╝ │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 7-2
Enter the pointers marking the beginning and the end of the block to be re-
indented. Notice that the Top or Bottom of the file or the Current cursor
location can be used as a beginning or end point. WED will now re-indent the
block.
The Indent function is aware of the Tab Conversion flag. If the flag is set to
"spaces" Indent will use only spaces. Otherwise Indent will indent the lines
with tabs whenever possible. The Tab Conversion setting can be altered with
the Setup command.
7.3 The Execute User Program Command
The eXecute user program command is an advanced command designed to facilitate
program development. With a single command the current edit file can be saved,
compiled and then editing can be resumed. This greatly reduces the effort and
time required to switch back and forth between the editor and the compiler or
assembler.
Before using this command it is necessary to the Setup command to tell WED
what compiler(s) and assembler(s) will be in use. This process is described in
chapter 10 of this manual.
To execute the user program command type Alt-X while at the main edit prompt.
WED will display a sub menu of the programs that have been installed. For
example, if a C compiler and an assembler have been installed the prompt might
appear as shown in figure 7-3.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: Col: Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞═════╔═╡ EXECUTE USER ╞═╗═════════│
│#define CR '\x0D'« ║ <Esc> to exit ║ │
│« ║ ║ │
│char style_strings[][41] = { "<style1>",« ║ MSC 5.1 ║ │
│ "<style2>",« ║ LINT ║ │
│ "<style3>"« ║ TASM 2.0 ║ │
│ };« ╚═════╡ <Esc> ╞════╝ │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 7-3
After selecting the program to be executed WED will save the current edit file
and setup a command line on the screen as shown in figure 7-4. Notice that WED
displays the amount of memory available for the program to run in.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Line: Col: Insert Size: 7K Free: 227K │
│══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
│Memory available: 340K │
│ │
│d:\msc\bin\cl F:\manual.c │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 7-4
The command line can be edited to add any command line parameters as needed.
Press the <Enter> key to run the program.
When the user program completes execution WED will present the menu as shown
in figure 7-5.
┌────────────────────────────────────────────────────────────────────────────────┐
│WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
│Saving . . . Processing . . . │
│══════════════════════════════════╡ manual.c ╞═════╔═╡ EXECUTE USER ╞═╗═════════│
│Memory available: 340K ║ Continue editing ║ │
│ ║ Main menu ║ │
│d:\msc\bin\cl F:\manual.c ║ Exit WED ║ │
│ ║ Help ║ │
│ ╚═════╡ <Esc> ╞════╝ │
└────────────────────────────────────────────────────────────────────────────────┘
Figure 7-5
Select "Continue editing" to return to the current edit file. This option is
useful when attempting to fix syntax errors reported by the compiler.
Select "Main menu" to exit the current edit file and return to the WED main
menu (remember, the current edit file was automatically saved just prior to
executing the user program). If more than one file is loaded WED will switch
to the most recent file instead of the main menu.
Select "Exit WED" to exit the current edit file and return to the DOS "C"
prompt. As with the "Main menu" option WED will switch to one of the other
file if more than one edit file is loaded.
7.4 The Pop-up ASCII Table
As a convenience to programmers WED includes a pop-up ASCII reference table. To pop-
up the table type alt-Y while in the main edit mode. The <Up> and <Dn> arrow
keys can be used to page through all 256 ASCII character values. After using
the table press the <Esc> key to return to editing.
This can be useful when using the graphics command to enter special
characters. To find out which key to press to enter a desired high-bit
character, look up the character in the table, and the required keystroke will
be displayed to its left.
8 Editing Special Characters
8.1 Editing Files with Control Characters
The WED editor has the ability to edit special characters called control characters. These
are the characters that can only be entered from the drop down insert mode. To
enter a control character hold down the <Ctrl> key and type the letter or
symbol. For example, to enter control-L hold down the <Ctrl> key and type L.
Control characters are displayed as a carat, ^, followed by the alphabetical
character. For example, Ctrl-G will be displayed as ^G. There is one exception
to this rule. The carriage return character (^M) displays as the special end
of line character.
8.2 Using Text or Graphics Characters
One of the nice features of the IBM PC and compatible computers is their ability to display
special graphics characters while in the standard text mode. These are the
high-bit set characters with ASCII values from 128 to 255. The most commonly
used characters are the line drawing characters used for drawing boxes and
tables. The outline boxes displayed on the opening screen of WED are drawn
using the line drawing characters.
WED has a special graphics mode which enables all of these characters to be
entered and edited. To switch to the graphics mode type Alt-T. Notice that the
mode displayed at the upper right corner of the text window changes from Text
to Graphics. Once WED is in the graphics mode it will translate any input
characters to graphics characters by setting the high order bit to 1. Appendix
C contains a table listing all of the possible input characters and graphics
characters that they will be translated to. For example, to enter the double
horizontal line character used at the top of the text window in WED switch to
graphics mode and type M.
To switch back to the text mode type Alt-T. The Text command (Alt-T) can be
used to toggle between the text and graphics modes while in the main edit mode
or in the insert mode.
9 Printing Files
The WED editor includes a file printing utility which is useful for printing source code files
as well as text files. Features include margin control, line numbering and
header lines with the file name, time and date, page number and a user entered
title.
To print a file select option two from the main menu and then select a file
to print. WED will then display the print menu shown in figure 9-1.
╔═══════════════╡ Print Parameters ╞═══════════════╗
║ print header yes ║
║ print line nos yes ║
║ title ║
║ ║
║ page height 66 ║
║ page width 80 ║
║ top margin 3 ║
║ bottom margin 3 ║
║ left margin 10 ║
║ ║
║ setup string ║
║ reset string ║
╚════════════════╡ <PgDn> to print ╞═══════════════╝
Figure 9-1
Use the <Up> and <Down> cursor keys to move between fields. Enter or change
the values in any of the fields as desired and press the <PgDn> key to begin
printing. The following paragraphs describe the individual printing
parameters. For a better understanding of the margins refer to the page layout
diagram 9-2 at the end of this chapter.
The first field indicates if WED should print header lines at the top of each
page. These header lines include: the file name, a user entered title, the
page number and the current time and date. This option is very useful when
generating source code listings. Press the <space> bar to toggle between "yes"
and "no."
The next field indicates if WED should print line numbers at the start of each
file line. This option is also useful when generating source code listings.
The title field can be used to print a title that will appear in the middle of
the top header line on each page. This field has no affect if "no" is selected
at the "print header" field.
The page height and page width settings tell WED how many rows and columns the
printer can print on each page.
The top and bottom margin settings specify how many lines to skip over at the
top and bottom of each page.
The left and right margin values determine the number of blank columns to
leave in the left and right margins on each page.
+-------------------- page width --------------------+
+ +----------------------------------------------------+
: | top |
: | margin |
: | +-----------------------------------+ |
: | | | |
: | | | |
: | | | |
: | | | |
: | | | |
: | | | |
page | left | | right |
height | marg | T E X T | marg |
: | | | |
: | | | |
: | | | |
: | | | |
: | | | |
: | | | |
: | | | |
: | | | |
: | +-----------------------------------+ |
: | bottom |
: | margin |
+ +----------------------------------------------------+
Figure 9-2
The printer setup string is a string of characters that will be sent to the
printer before printing a file. This string can contain any eight-bit values
needed to place the printer in the proper mode(s) for printing the file. One
use of this string might be to place the printer in a condensed mode for
printing source code listings.
Setup strings are made up of a series of characters and ASCII codes. ASCII
codes are represented with standard C notation, "\ddd," where the back slash
signals an ASCII code and is followed by the actual code in decimal base. For
example, the <Esc> character (ASCII 27) would be represented as "\27." As in
C,a hex or binary base can be specified by prefixing the value with an "x" or
a "b." For example, <Esc> would be entered as "\x1A" in hex.
The printer reset string is similar to the setup string. The only difference
is that it is sent to the printer after the file has been printed. The purpose
of this string is to reset the printer to its normal mode. For example, the
string may contain the codes to return the printer to normal density printing
after printing the file with condensed print: "\x12"
10 The Setup Command
The setup command permits various parameters to be changed that affect the way WED
operates during an edit session. This command can be used to make temporary
changes for the current edit session or can save the changes so that they will
remain in effect for future sessions.
There are two ways to access the Setup command. From the main menu, select
option four. If editing a file, type Alt-S and the screen will appear as shown
in figure 10-1.
╔═════════════════════════╡ SET UP ╞═════════════════════════╗
║ Help Format ║
║ Miscellaneous auto indent on ║
║ cursor type block word wrap off ║
║ eoln symbol « right margin 65 ║
║ locate key clear tab conversion spaces ║
║ user programs tab stops ║
║ keyboard macros Printing ║
║ split screen split print header yes ║
║ default mode overwrite print line nos yes ║
║ insert type push page height 66 ║
║ <del> key del char page width 80 ║
║ Files top margin 3 ║
║ make BAK files yes bottom margin 3 ║
║ file name keep keep left margin 10 ║
║ swap path setup string ║
║ Video reset string ║
║ monitor type color ║
║ colors ║
║ ega 43 line no ║
║ snow removal off save setup values ║
╚═══════════════════╡ <Esc> to exit Setup ╞══════════════════╝
Figure 10-1
To change a value use the cursor keys to move the cursor bar to the desired
field. If the field description is followed by a status word press the <space>
bar to toggle between the available choices. If the field description is
followed by a numerical value press the <space> bar and then enter the new
value. If there is no status or value following the field press the <space>
bar and WED will open a new window to prompt for additional information.
Once in the Setup menu it is possible to make as many changes as needed. When
done press the <Esc> key to exit the Setup command. To preserve the changes
that have made for future edit sessions select the last setup field "save
setup values."
If help is needed while using the setup command select the first setup field,
"help", and WED will display general information about the setup command. If
detailed information is desired on one of the setup fields, move the cursor
bar to that field and type Alt-H.
The rest of this chapter is devoted to providing detailed descriptions for
each of the setup fields.
10.1 Cursor Type
There are two cursor shapes available to use during editing: a standard
underline cursor or an easier to see block cursor. The current cursor choice
is shown next to the "Cursor" prompt.
10.2 End-Of-Line Symbol
WED uses a special character to indicate the location of carriage returns in a
file. The default value for this character is ASCII 174, which looks like a
pair of left facing arrows. To change this value select Setup field two and
WED will prompt for a new ASCII value. Enter a value from 32 to 255.
10.3 Locate Key Keep
The Locate Key flag is similar to the File Name flag. When it is set to "keep"
WED remembers the most recent Locate phrase. Each time the Locate or Replace
command is executed the last search phrase will be displayed. The phrase can
be accepted, edited or a new one can be entered. The editing keys available
while entering file names are the left and right cursor keys, the home and end
keys, the plus and minus keys and the backspace key. In addition, the <Ins>
key toggles between over-write and insert modes and Ctrl-<End> key erases from
the cursor to the end of the entry.
If the Locate Key flag is set to "clear" it will be necessary to enter the
complete search phrase every time the Locate and Replace commands are used.
10.4 User Programs
With the eXecute command WED provides the ability to run compilers or other
programs from within the editor. Before executing a program with this command
it is necessary to install it using the User Programs option of the setup
menu. Select the user programs setup field to enter or change programs. The
screen will appear as shown in figure 10-2. The eXecute command is described
in Chapter Seven.
╔═════════════════════╡ USER PROGRAMS ╞════════════════════╗
║ Prompt Path/name ║
║ MSC 5.1 d:\msc\bin\cl ║
║ LINT c:\usr\bin\lint ║
║ TASM 2.0 d:\borlandc\bin\tasm ║
║ ░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
║ ░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
║ ░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
╚═════════════════════╡ <Esc> to exit ╞════════════════════╝
Figure 10-2
Use the <up> and <down> cursor keys to select one of the six program slots. To
add a new program move to the first blank line and enter the new program.
Start by entering a prompt for this program. This is the selection text that
will be displayed in the pull down menu. Next enter the path and file name of
the actual program. Finally, WED will prompt for the minimum memory required
to run the program. WED will use this number to determine if it should swap
the current edit file(s) out to make room for the program.
Any of the user program entries can be changed by moving to the desired line
and editing the entries.
10.5 Keyboard Macros
The macro facility provided with WED is designed to save keystrokes and to
allow the customization of the editor to suit individual needs. A macro is a
set of up to twenty commands (keystrokes) that can be assigned to a particular
function key combination. When that key is pressed the commands in the macro
will be executed just as if they had been entered from the keyboard. Up to
forty macros can be defined using the four variations of the ten function
keys: <F1>, <Shift><F1>, <Ctrl><F1> and <Alt><F1>.
Select the keyboard macros setup field to enter or change keyboard macros. The
screen will appear as shown in figure 10-3.
╔══════════════════════════════╡ KEYBOARD MACROS ╞═════════════════════════════╗
║ Enter macro key to edit: ║
║ Macro<F5>: ^O1 ║
║ Enter macro, then <F5>: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
╚═══════════════════════════════╡ <Esc> to exit ╞══════════════════════════════╝
Figure 10-3
Select a macro by pressing one of the forty function key combinations. For
example, to redefine the <Ctrl><F8> macro hold down the <Ctrl> key and press
the <F8> key.
WED will display the current contents of the macro on the next line and will
provide space to enter the new contents of the macro on the following line.
Enter the macro keystrokes as if typing them directly into WED during an edit
session. The <Backspace> key can be used to make corrections. When the macro
is complete press the function key combination to accept the entry. WED does
not change the original macro if an empty macro is entered.
10.6 Split Screen
The Split screen flag controls manner in which WED displays the edit files
when using the Other File command. When Split screen is set the Other File
command "splits" the screen by drawing a horizontal line across the middle. It
then displays two of the edit files at the same time with one on the top half
and the other file on the lower half of the screen.
Select "zoom" to use the full screen to edit each file, or "split" to use the
split screen feature.
10.7 Insert Type
WED supports two types of insert modes which are described in section 4.2.
Select the keyboard assignments for these two modes using the Insert Type
switch from Setup. If the Insert Type is set to "push" the push setup mode
will be assigned to the <Ins> key and the drop-down insert mode will be
assigned to Alt-I. If the Insert Type is set to "drop down" then these key
assignments will be reversed.
10.8 <del> Key
With the <del> key Setup switch the <del> key can be selected to operate in
the Erase mode or delete char commands.
10.9 Make BAK Files
When WED saves a file it normally makes a backup of the old version before
saving the newly edited version of the file. It accomplishes this by first
renaming the old file with an extension of ".BAK" and then saving the new
file. For example, if editing a file name "program.c" WED will rename the
original file to "program.bak" and then save the edited version as
"program.c." This automatic backup feature can be disabled by changing the
"make BAK files" setting to "no."
10.10 File Name Keep
The File Name flag is designed to save time entering file names while editing.
When File Name is set to "keep" WED remembers the last file name entered.
Every time WED prompts for a file name the last file name entered will be
displayed. This name can be edited or a new one can be entered. The editing
keys available while entering file names are: the left and right cursor keys,
the home and end keys, the plus and minus keys and the backspace key. In
addition, the <Ins> key toggles between overwrite and insert modes and the
Ctrl-<End> key erases from the cursor to the end of the entry.
If the File Name flag is set to "clear" it will be necessary to enter a
complete file name whenever executing a file command.
10.11 Swap Path
When editing very large files WED may have to swap some of the text out to
disk because there is not enough memory to hold the entire file in RAM. WED
may also have to swap text to disk when using the eXecute command to execute
user programs or compilers. When the editor swaps out text it writes it to a
file called "WEDSWAP.TXT." Normally, it creates this file in the default
directory, but it is possible to specify a different directory with the Swap
Path setup field. This feature can be used to improve performance by
specifying a ram-disk.
To change the swap path select the Swap Path setup field. WED will open a
window and prompt for the new swap path. Enter the complete path specification
(including the disk drive if different from the default).
10.12 Monitor Type
Some computer systems combine a monochrome monitor with a color adapter card.
These systems display colors as shades a gray, a display mode which can be
hard on the eyes when performing text functions such as editing.
It is possible to use the color selection function to select black and white
color combinations, but WED provides an easier way. Setting the Monitor Type
setup field to "mono" automatically selects black and white color
combinations.
10.13 Colors
It is possible to select the colors that will be used during edit sessions.
Color sets can be selected for the various window types such as edit, menus,
help, etc. For each window type select the colors for five attribute types:
background, normal, highlighted, border and field text.
To change colors select the "Colors" setup field and WED will display the
color selection menu. Use the <up> and <down> cursor keys to select the window
type, the <left> and <right> cursor keys to select the attribute type and the
<space> bar to step through the available colors.
10.14 EGA 43 Line Mode
Most EGA video adapters support a compressed text mode with forty-three lines
on the screen. If using one of these EGA adapters, it is possible to use the
43-line mode when editing with WED.
When the WED 43-line mode field is set to "yes" WED automatically switches to
the adapter to the condensed mode. When exiting WED the editor always resets
the adapter to the standard 25-line mode.
10.15 Snow Removal
Some computers with color display systems may experience problems with video
snow while using WED. Eliminate the snow by setting the Snow Removal switch to
"yes".
In order to eliminate the video snow WED must wait for the monitor to perform
a vertical retrace. This means that screen output will be slower when the Snow
Removal switch is set to "yes". For this reason some users may opt to tolerate
the screen snow and leave the Snow Removal switch set to "no" so that WED's
screen output will be as fast as possible.
10.16 Auto Indent
The auto indent mode saves key strokes when editing programs which use
indentation. This feature only operates when the editor is in the Insert mode.
If auto indent is turned on and text is being entered in Insert mode WED will
automatically indent any new lines created to the same level as the previous
lines. It does this by automatically entering spaces at the beginning of the
line. To change the indentation level of the new line, use either the
backspace or space keys to reduce or increase the indentation level of the
line.
10.17 Word Wrap
WED supports a word wrap mode for documentation and light word processing
tasks. When word wrap is on and text is entered past the right margin WED will
move the current word down to the next line. The right margin column setting
is another setup field and is described below.
The Format command will reflow or reformat the text within the margins. The
word wrap mode is described in detail in chapter six of this manual.
10.18 Right Margin
The right margin setting determines the column at which WED will attempt to
word wrap the current input line. This setup field has no effect when Word
Wrap is set turned off.
10.19 Tab Conversion
The tab character is a special character in ASCII files. When it is displayed
on the screen, as with an editor, it is displayed as a series of blanks. The
number of blanks is determined by the screen column on which the tab character
is positioned and on the current settings of the tab stops. Enough blanks will
be included to cause the next character to be displayed at the next tab stop.
In WED, the tab stops are set every eight columns starting with column one.
These settings cannot be changed.
Tabs are most useful for lining up columns of numbers, words or other text.
They are also handy for quickly moving the cursor out to a higher column. For
example, moving to column seventeen takes sixteen keystrokes with the space
key, but only two keystrokes with the tab key.
In high level languages it is often convenient to be able to move out to
desired columns using the tab key, but it is undesirable to have actual tab
characters inserted into the source file because they make it difficult to
change indentation.
WED provides an answer to this conflict. The Tabs flag controls the action of
the tab key in the Insert mode. When this flag is set to "tabs" the tab key
works normally and causes a tab character to be inserted into the text. When
the flag is set to "spaces" the tab key causes space characters to be inserted
instead of a tab character. Enough spaces will be inserted to move the cursor
to the next tab stop.
10.20 Tab Stops
All registered copies of WED will be received with the tab stops set to the
default value of every eight columns. These setting can be altered with the
tab stops option on the Setup menu. Up to forty tab stops can be set in any
column up to column 78.
To change the tab stops select that option from the Setup menu and WED will
open a window containing a format line with a ">" at each tab stop. To add or
remove a tab stop move the cursor to the desired column and press <Tab> to add
a tab stop or <Space> to remove a tab stop. When done press <Enter> to store
the new tab settings.
10.21 Print Header
The WED file printing utility provides an option for printing header lines on
each page of the listing. These header lines include the file name, a user
entered title, the page number and the current time and date. This option is
very useful when generating source code listings.
If header lines are not desired set the "print header" status to "no."
10.22 Print Line Numbers
The WED file printing utility provides an option for printing line numbers on
each line of the listing. This option is very useful when generating source
code listings.
If line numbers are not desired set the "print line nos" status to "no."
10.23 Printer Page Height
When using the file printing utility it is necessary to specify the total
number of lines per page. For most applications this value will be 66.
10.24 Printer Page Width
When using the file printing utility it is necessary to specify the total
number of columns per line. For most applications this value will be 80 or
132.
10.25 Printer Top Margin
The top margin value specifies the number of blank lines to skip over at the
top of each page when printing files.
10.26 Printer Bottom Margin
The bottom margin value specifies the number of blank lines to skip over at
the bottom of each page when printing files.
10.27 Printer Left Margin
The left margin value specifies the number of columns to skip over at the
beginning of each line when printing files.
10.28 Printer Right Margin
The right margin value specifies the number of blank to skip over at the end
of each line when printing files.
10.29 Printer Setup String
The printer setup string is a string of characters that will be sent to the
printer before printing a file. This string can contain any eight-bit values
needed to place the printer in the proper mode(s) for printing the file. One
use of this string might be to place the printer in a condensed mode for
printing source code listings.
Setup strings are made up of a series of characters and ASCII codes. ASCII
codes are represented with standard C notation, "\ddd", where the back slash
signals an ASCII code and is followed by the actual code in decimal base. For
example, the <Esc> character (ASCII 27) would be represented as "\27." As in
C, a hex or binary base can be specified by prefixing the value with an "x" or
a "b." For example, <Esc> would be entered as "\x1A" in hex.
The following is an example of a complete printer setup string that places an
Epson compatible printer into condensed mode printing: "\x0F"
10.30 Printer Reset String
The printer reset string is similar to the setup string only it is sent to the
printer after the file has been printed. The purpose of this string is to
reset the printer to its normal mode. For example, the string may contain the
codes to return the printer to normal density printing after printing the file
with condensed print: "\x12"
10.31 Save Setup Values
Configuration changes made with the setup command are only retained during the
current edit session. For the changes to remain in effect for future edit
sessions they must be saved on disk. To do this select the last setup field,
"save setup values," and WED will write the current configuration to a file
called WED.CFG. This file will be placed in the same sub-directory as WED.EXE.